home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ALPH.{_4 / VGA.H < prev   
C/C++ Source or Header  |  1999-09-17  |  948b  |  57 lines

  1. /*
  2.  *    Access to VGA videoram
  3.  *
  4.  *    (c) 1998 Martin Mares <mj@ucw.cz>
  5.  */
  6.  
  7. #ifndef _LINUX_ASM_VGA_H_
  8. #define _LINUX_ASM_VGA_H_
  9.  
  10. #include <asm/io.h>
  11.  
  12. #define VT_BUF_HAVE_RW
  13. #define VT_BUF_HAVE_MEMSETW
  14. #define VT_BUF_HAVE_MEMCPYF
  15.  
  16. extern inline void scr_writew(u16 val, u16 *addr)
  17. {
  18.     if ((long) addr < 0)
  19.         *addr = val;
  20.     else
  21.         writew(val, (unsigned long) addr);
  22. }
  23.  
  24. extern inline u16 scr_readw(const u16 *addr)
  25. {
  26.     if ((long) addr < 0)
  27.         return *addr;
  28.     else
  29.         return readw((unsigned long) addr);
  30. }
  31.  
  32. extern inline void scr_memsetw(u16 *s, u16 c, unsigned int count)
  33. {
  34.     if ((long)s < 0)
  35.         memsetw(s, c, count);
  36.     else
  37.         memsetw_io(s, c, count);
  38. }
  39.  
  40. extern inline void scr_memcpyw_from(u16 *d, const u16 *s, unsigned int count)
  41. {
  42.     memcpy_fromio(d, s, count);
  43. }
  44.  
  45. extern inline void scr_memcpyw_to(u16 *d, const u16 *s, unsigned int count)
  46. {
  47.     memcpy_toio(d, s, count);
  48. }
  49.  
  50.  
  51. #define vga_readb readb
  52. #define vga_writeb writeb
  53.  
  54. #define VGA_MAP_MEM(x) (x)
  55.  
  56. #endif
  57.